home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / bigarr / bigarray.frm < prev    next >
Text File  |  1995-01-10  |  10KB  |  300 lines

  1. VERSION 2.00
  2. Begin Form frmBigArray 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   """BIG DISK ARRAY' Demonstration"
  5.    ClientHeight    =   6120
  6.    ClientLeft      =   960
  7.    ClientTop       =   1335
  8.    ClientWidth     =   7245
  9.    Height          =   6465
  10.    Left            =   930
  11.    ScaleHeight     =   6120
  12.    ScaleWidth      =   7245
  13.    Tag             =   "BIGARRY1"
  14.    Top             =   1020
  15.    Width           =   7305
  16.    Begin CommandButton Command1 
  17.       Caption         =   "Start the &demonstration"
  18.       Default         =   -1  'True
  19.       Height          =   465
  20.       Left            =   2070
  21.       TabIndex        =   15
  22.       Top             =   5490
  23.       Width           =   2985
  24.    End
  25.    Begin ComboBox Combo1 
  26.       Height          =   300
  27.       Left            =   6390
  28.       Sorted          =   -1  'True
  29.       TabIndex        =   14
  30.       Top             =   4680
  31.       Width           =   735
  32.    End
  33.    Begin TextBox nSheets 
  34.       Height          =   285
  35.       Left            =   6390
  36.       MaxLength       =   2
  37.       TabIndex        =   12
  38.       Text            =   "7"
  39.       Top             =   4320
  40.       Width           =   735
  41.    End
  42.    Begin TextBox nCols 
  43.       Height          =   285
  44.       Left            =   6390
  45.       MaxLength       =   3
  46.       TabIndex        =   10
  47.       Text            =   "70"
  48.       Top             =   3960
  49.       Width           =   735
  50.    End
  51.    Begin TextBox nRows 
  52.       Height          =   285
  53.       Left            =   6390
  54.       MaxLength       =   3
  55.       TabIndex        =   8
  56.       Text            =   "70"
  57.       Top             =   3600
  58.       Width           =   735
  59.    End
  60.    Begin OptionButton Option1 
  61.       BackColor       =   &H00C0C0C0&
  62.       Caption         =   "&French"
  63.       Height          =   255
  64.       Index           =   1
  65.       Left            =   4680
  66.       TabIndex        =   5
  67.       Top             =   2160
  68.       Width           =   1545
  69.    End
  70.    Begin OptionButton Option1 
  71.       BackColor       =   &H00C0C0C0&
  72.       Caption         =   "&English"
  73.       Height          =   255
  74.       Index           =   0
  75.       Left            =   2700
  76.       TabIndex        =   4
  77.       Top             =   2160
  78.       Value           =   -1  'True
  79.       Width           =   1545
  80.    End
  81.    Begin Line Line1 
  82.       BorderColor     =   &H00FFFFFF&
  83.       BorderWidth     =   2
  84.       Index           =   3
  85.       X1              =   90
  86.       X2              =   7110
  87.       Y1              =   5130
  88.       Y2              =   5130
  89.    End
  90.    Begin Label Label3 
  91.       BackStyle       =   0  'Transparent
  92.       Caption         =   "Select &the drive (only drive with enough space are displayed)"
  93.       Height          =   195
  94.       Index           =   3
  95.       Left            =   90
  96.       TabIndex        =   13
  97.       Top             =   4725
  98.       Width           =   6225
  99.    End
  100.    Begin Label Label3 
  101.       BackStyle       =   0  'Transparent
  102.       Caption         =   "Enter number of &Sheets (1 TO 10)"
  103.       Height          =   195
  104.       Index           =   2
  105.       Left            =   90
  106.       TabIndex        =   11
  107.       Top             =   4350
  108.       Width           =   6225
  109.    End
  110.    Begin Label Label3 
  111.       BackStyle       =   0  'Transparent
  112.       Caption         =   "Enter number of &Cols (1 TO 100)"
  113.       Height          =   195
  114.       Index           =   1
  115.       Left            =   90
  116.       TabIndex        =   9
  117.       Top             =   3990
  118.       Width           =   6225
  119.    End
  120.    Begin Line Line1 
  121.       BorderColor     =   &H00FFFFFF&
  122.       BorderWidth     =   2
  123.       Index           =   2
  124.       X1              =   90
  125.       X2              =   7110
  126.       Y1              =   3510
  127.       Y2              =   3510
  128.    End
  129.    Begin Label Label3 
  130.       BackStyle       =   0  'Transparent
  131.       Caption         =   "Enter number of &Rows (1 TO 100)"
  132.       Height          =   195
  133.       Index           =   0
  134.       Left            =   90
  135.       TabIndex        =   7
  136.       Top             =   3630
  137.       Width           =   6225
  138.    End
  139.    Begin Label Label1 
  140.       BackStyle       =   0  'Transparent
  141.       Caption         =   "Before the beginning of the demonstration, you must enter the value of the 3 dimensions that you want to use. The input of the value are voluntary limited to 100 Rows, 100 Cols and 10 Sheets. This is done to limit the place of each array type on disk. You must have 7 Mb free on test drive for this demonstration."
  142.       Height          =   825
  143.       Index           =   3
  144.       Left            =   90
  145.       TabIndex        =   6
  146.       Top             =   2610
  147.       Width           =   7035
  148.       WordWrap        =   -1  'True
  149.    End
  150.    Begin Line Line1 
  151.       BorderColor     =   &H00FFFFFF&
  152.       BorderWidth     =   2
  153.       Index           =   1
  154.       X1              =   90
  155.       X2              =   7110
  156.       Y1              =   2520
  157.       Y2              =   2520
  158.    End
  159.    Begin Label Label2 
  160.       BackStyle       =   0  'Transparent
  161.       Caption         =   "Select a &language : "
  162.       Height          =   195
  163.       Left            =   90
  164.       TabIndex        =   3
  165.       Top             =   2190
  166.       Width           =   2535
  167.    End
  168.    Begin Line Line1 
  169.       BorderColor     =   &H00FFFFFF&
  170.       BorderWidth     =   2
  171.       Index           =   0
  172.       X1              =   90
  173.       X2              =   7110
  174.       Y1              =   2070
  175.       Y2              =   2070
  176.    End
  177.    Begin Label Label1 
  178.       BackStyle       =   0  'Transparent
  179.       Caption         =   "A 'BIG DISK ARRAY' can use a maximum of 3 dimensions : Rows, Cols, Sheets. Each dimension can have a theoric value of 2.147.483.647.  However, you're limited to the size of the disk on which the array is defined."
  180.       Height          =   645
  181.       Index           =   2
  182.       Left            =   90
  183.       TabIndex        =   2
  184.       Top             =   1350
  185.       Width           =   7035
  186.       WordWrap        =   -1  'True
  187.    End
  188.    Begin Label Label1 
  189.       BackStyle       =   0  'Transparent
  190.       Caption         =   "The 'BIG DISK ARRAY' creates/uses ARRAY (standard variable or type'd variable) on DISK in place of MEMORY.  This lets precious memory available for any other application."
  191.       Height          =   645
  192.       Index           =   1
  193.       Left            =   90
  194.       TabIndex        =   1
  195.       Top             =   630
  196.       Width           =   7035
  197.       WordWrap        =   -1  'True
  198.    End
  199.    Begin Label Label1 
  200.       Alignment       =   2  'Center
  201.       BackStyle       =   0  'Transparent
  202.       Caption         =   "The 'BIG DISK ARRAY' demonstrates a part of 'TIME TO WIN' DLL for VB 3.0.  Some other routines are used to perform the demonstration."
  203.       Height          =   465
  204.       Index           =   0
  205.       Left            =   90
  206.       TabIndex        =   0
  207.       Top             =   90
  208.       Width           =   7035
  209.       WordWrap        =   -1  'True
  210.    End
  211. End
  212. Option Explicit
  213. Dim AlreadyLoaded    As Integer
  214.  
  215. Sub Combo1_Click ()
  216.    SelectedDrive = Combo1.Text
  217.    DirectoryTest = SelectedDrive + ":\t2w_tmp"
  218. End Sub
  219.  
  220. Sub Command1_Click ()
  221.  
  222.    DoEvents
  223.  
  224.    Dim Erreur     As Integer
  225.    Dim ErrCode    As Integer
  226.  
  227.    Erreur = False
  228.    
  229.    ' if no drive with enough space, display error message
  230.    If (AtLeastOneValidDrive = False) Then
  231.       Call DisplayMessage(frmBigArray, "1", "")
  232.       Exit Sub
  233.    End If
  234.  
  235.    Rows = Val(nRows.Text)
  236.    Cols = Val(nCols.Text)
  237.    Sheets = Val(nSheets.Text)
  238.  
  239.    ' if the number of Rows is outside range, display error messsage
  240.    If (cBetween(Rows, 1, MaxRows) = False) Then
  241.       Erreur = True
  242.       Call DisplayMessage(frmBigArray, "2", Format$(MaxRows))
  243.    End If
  244.    
  245.    ' if the number of Cols is outside range, display error messsage
  246.    If (cBetween(Cols, 1, MaxCols) = False) Then
  247.       Erreur = True
  248.       Call DisplayMessage(frmBigArray, "3", Format$(MaxCols))
  249.    End If
  250.  
  251.    ' if the number of Sheets is outside range, display error mess